<template>
  <div class="welcome">
    <el-table :data="logs" align="center" style="width: 100%">
      <el-table-column prop="username" label="登入账户" width="180" align="center">
      </el-table-column>
      <el-table-column
        align="center"
        prop="lastLogin.ip"
        label="上次登入ip"
        width="180"
      >
      </el-table-column>
      <el-table-column
        align="center"
        prop="lastLogin.loginTime"
        label="上次登入时间"
      >
      </el-table-column>
      <el-table-column align="center" prop="nowLogin.ip" label="本次登入ip">
      </el-table-column>
      <el-table-column
        align="center"
        prop="nowLogin.loginTime"
        label="本次登入时间"
      >
      </el-table-column>
    </el-table>
  </div>
</template>

<script>
import * as api from "../../../api/index";
export default {
  data() {
    return {
      logs: [],
    };
  },
  created() {
    api.getLoginLogApi().then((res) => {
      //   console.log(res.data);
      this.logs = res.data.data;
      console.log(this.logs);
    });
  },
};
</script>
<style lang="less" scoped>
.welcome {
  margin-top: 20px;
}
</style>